package homework;

public class Day03Homework2 {
    public static void main(String[] args) {
        /*
        System.out.println(5%2);
        System.out.println(8%2);
        System.out.println(2%7);
        int a=5,b=5;
        a++;
        ++b;
        System.out.println(a);
        System.out.println(b);
        int aa=5,bb=44;
        aa--;
        --bb;
        System.out.println(aa);
        System.out.println(bb);
        */
        /*
        int a=5,b=5;
        int c=a++;
        int d=++b;
        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
        System.out.println(d);
        int aa=3,bb=3;
        int cc=aa--;
        int dd=--bb;
        System.out.println(aa);
        System.out.println(bb);
        System.out.println(cc);
        System.out.println(dd);
        */
        /*int a=5,b=10,c=5;
        boolean b1 =b>a;
        System.out.println(b1);
        System.out.println(c<b);
        System.out.println(a>=c);
        System.out.println(b<=a);
        System.out.println(b==c);
        System.out.println(a!=c);

        System.out.println(a+c>10);
        System.out.println(b%2==0);
        System.out.println(c++>5);
        System.out.println(c++>5);

        int aa=5,bb=10,cc=5;
        boolean bb1=bb>aa&&bb<cc;
        System.out.println(bb1);
        System.out.println(bb<=cc&&bb>aa);
        System.out.println(aa==bb&&cc>bb);
        System.out.println(bb!=cc&&aa<bb);

        System.out.println(bb>=aa||bb<cc);
        System.out.println(bb<=cc||bb>aa);
        System.out.println(bb!=cc||aa<bb);
        System.out.println(aa==bb||cc>bb);

        boolean b2 =!(a<b);
        System.out.println(b2);
        System.out.println(!(a>b));
        */
        int a =5,b=10,c=5;
        boolean b3 =a>b && c++>2;
        System.out.println(b3);
        System.out.println(c);
        boolean b4 =a<b||c++>2;
        System.out.println(b4);
        System.out.println(c);

        int aa=5;
        aa+=10;
        System.out.println(aa);
        aa*=2;
        System.out.println(aa);
        aa/=6;
        System.out.println(aa);
        short s =5;
        //s =s+10;
        s+=10;
        int age = 38;
        System.out.println("age=");
        System.out.println(age);
        System.out.println("age="+age);
        System.out.println("我今年"+age+"岁了");

        System.out.println(10+20+""+30);
        System.out.println(""+10+20+30);
        System.out.println(10+20+30+"");
        int num =5;
        int flag = num>0?1:-1;
        System.out.println(flag);
        int a1=8,b1=5;
        int max = a1>b1?a1:b1;
        System.out.println("max="+max);
        double price =400;
        if(price>=500){
            price *=0.8;
        }
        System.out.println("最终金额"+price);

        int score =444;
        if(score>=0&&score<=100){
            System.out.println("合法");
        }
        System.out.println("继续执行");

        double price1=6000.0;
        if(price1>=2000){
            price1 *=0.5;
        }else if(price1>=1000){
            price1 *=0.7;
        }else if(price1>=500){
            price1 *=0.8;
        }else{
            price1 *=0.9;
        }
        System.out.println("最终金额"+price1);

    }
}
